package cn.iocoder.yudao.module.infrastructure.notify.api;

import cn.iocoder.yudao.module.api.infrastructure.notify.NotifyMessageSendApi;
import cn.iocoder.yudao.module.api.infrastructure.notify.dto.NotifySendSingleToUserReqDTO;
import cn.iocoder.yudao.module.infrastructure.notify.service.NotifySendService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * 站内信发送 API 实现类
 *
 * @author xrcoder
 */
@Service
public class NotifyMessageSendApiImpl implements NotifyMessageSendApi {

    @Resource
    private NotifySendService notifySendService;

    @Override
    public Long sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO dto) {
        return notifySendService.sendSingleNotifyToAdmin(dto.getUserId(),
                dto.getTemplateCode(), dto.getTemplateParams());
    }

    @Override
    public Long sendSingleMessageToMember(NotifySendSingleToUserReqDTO dto) {
        return notifySendService.sendSingleNotifyToMember(dto.getUserId(),
                dto.getTemplateCode(), dto.getTemplateParams());
    }

}
